import React, { createContext } from 'react';
/* 创建 context 上下文 */
export const { Provider, Consumer } = React.createContext({
  title: '默认数据'
});

/* 创建第二个局部的context */
export const contextTwoData = {
  spaceName: 'myContext_two',
  total: 20220224
};
export const myContext_two = createContext(null);

/* context 全局数据 */
const myContext = createContext({
  spaceName: 'myContext',
  count: 101
});

export default myContext;
